package com.ty.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @since : 2024/3/2 16:43
 */
@Data
public class OrderReq {
    /**
     * 用户id
     */
    private Long userId;

    /**
     * 商品id
     */

    private String ids;

    /**
     * 期刊购买数量
     */
    private Integer num;

    /**
     * 期刊购买年数
     */
    private Integer year;

    /**
     * 起刊时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GTM+8")
    private LocalDate startTime;


    /**
     * 期刊单价
     */
    private Double price;

    private Long addressId;
}
